home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / std / c / 462 < prev    next >
Text File  |  1996-08-06  |  843b  |  33 lines

  1. Path: baja.pacificrim.net!news
  2. From: JACKIE MILLER <MSIMONDS@MAIL.PACIFICRIM.NET>
  3. Newsgroups: comp.std.c
  4. Subject: Need help with fprintf(stdprn,format,arg)
  5. Date: 28 Feb 1996 16:43:22 GMT
  6. Organization: MCI
  7. Message-ID: <4h20na$6ps@baja.pacificrim.net>
  8. NNTP-Posting-Host: whatcom-ppp17.pacificrim.net
  9. Mime-Version: 1.0
  10. Content-Type: text/plain; charset=us-ascii
  11. Content-Transfer-Encoding: 7bit
  12. X-Mailer: Mozilla 1.22 (Windows; U; 16bit)
  13.  
  14. This short c program doesn't seem to work. I'm runiing a 486 clone with 
  15. Borland Turbo C.
  16.  
  17. #include>stdio.h>
  18. main()
  19. {
  20. float f = 2.0134;
  21. fprintf(stdprn, "Print this on the printer\r\n");
  22. fprintf(stdprn, "and now some numbers: \r\n");
  23. fprintf(stdprn, "The square of %f is %f",f,f*f);
  24. fprintf(stdprn, "\f"); /**form feed**/
  25. }
  26.  
  27. any help with redirecting out to the printer would be appreciated.
  28.  
  29. Thanks
  30.  
  31. Kevin.
  32.  
  33.